export const formOption = ref({
  inline: true,
  showResetButton: true,
})
export const fieldList = ref([
  {
    field: "ClientOrderCode",
    placeholder: "平台订单号",
    type: "textarea",
    style: { width: "240px" },
  },
  {
    field: "AudiState",
    type: "select",
    options: {
      placeholder: "退款状态",
      data: [
        { label: "审核中", value: "0" },
        { label: "审核通过", value: "1" },
        { label: "已退款", value: "2" },
        { label: "取消该申请", value: "3" },
      ],
    },
    // origin: "refund_type",
    style: { width: "140px" },
  },
])
// const OrderStatusOpt = {
//   0: "审核中",
//   1: "审核通过",
//   2: "已退款",
//   3: "取消该申请",
// }
// 操作
export const handleFunctions = ref({})

export const tablecColumns = ref([
  {
    params: "left",
    minWidth: 240,
    title: "订单信息",
    slots: {
      default: ({ row }) => {
        return (
          <div>
            <VText title="退款ID" value={row.id} line={1} />
            <VText title="平台" value={row.Platform} line={1} />
            <VText title="店铺" value={row.OrderSourceName} line={1} />

            <VText title="赛盒订单号" value={row.OrderCode} line={1} type="link" />
            <VText title="客户ID" value={row.ClientUserAccount} line={1} />
            <VText title="平台订单号" value={row.ClientOrderCode} line={1} type="link" onClick={() => handleFunctions?.value?.gotoDtl(row)}></VText>
            <VText title="类型" value={row.ShippingTypeDesc} line={1} type="link" />
          </div>
        )
      },
    },
  },
  {
    title: "商品信息",
    width: 350,
    slots: { default: "GoodsSlot" },
  },

  {
    title: "订单状态",
    width: 130,
    slots: {
      default: ({ row }) => {
        return (
          <div>
            {/* <p class="text-[16px] font-[600] ">{OrderStatusOpt[row.OrderState] || "-"}</p> */}
            {row.OrderStateDesc}
          </div>
        )
      },
    },
  },

  {
    title: "退款状态",
    width: 130,
    slots: {
      default: ({ row }) => {
        return (
          <div>
            <p class="text-[16px] font-[600] text-[var(--base-text-color)] mb-[4px]">{row.AudiStateDesc}</p>
          </div>
        )
      },
    },
  },
  {
    title: "退款金额",
    minWidth: 250,
    slots: {
      default: ({ row }) => {
        return (
          <div>
            <VText title="退款类型" value={row.RefundTypeDesc} line={1} />
            <VText title="退款金额" value={`${row.RefundCurrency} ${row.RefundPrice}`} line={1} class="text-red" />
            <VText title="订单金额（含税）" value={`${row.RefundCurrency} ${row?.TotalPrice || ""}`} line={1} />
          </div>
        )
      },
    },
  },

  {
    title: "备注信息",
    width: 200,
    slots: {
      default: ({ row }) => {
        return <VText title="备注" value="赛盒获取退款订单" line={2} />
      },
    },
  },
  {
    title: "退款来源",
    width: 160,
    slots: {
      default: ({ row }) => {
        return <VText value="赛盒历史退款单" />
      },
    },
  },
  {
    title: "操作人",
    width: 200,
    slots: {
      default: ({ row }) => {
        return <VText title="退款人员" value={row.OperatorName} line={2} />
      },
    },
  },
  {
    title: "时间信息",
    width: 230,
    slots: {
      default: ({ row }) => {
        return (
          <div>
            <VText title="申请时间" value={row.ApplyRefundTime} line={2} />
            <VText title="退款时间" value={row.RefundTime} line={2} />
          </div>
        )
      },
    },
  },
])
